package com.niit.RPCServer;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.RPC;

import java.net.InetSocketAddress;

//构造RPC Client 并发送请求

public class LoginController {
    public static void main(String[] args) {
        try {
            com.niit.RPCServer.LoginServiceInterface
                    proxy = RPC.getProxy(com.niit.RPCServer.LoginServiceInterface.class,1L,
                    new InetSocketAddress("localhost",1000),new Configuration());
            String result = proxy.login("node1","ABC2002317");
            System.out.println(result);

        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
